import axios from "axios";
//基础访问地址
axios.defaults.baseURL = 'http://localhost:3000'
//获取音乐列表
export const getMusicList = (keyword:string | string[])=>{
    let res = axios.get('/search?keywords='+keyword);
    return res;
}
//根据id获取音乐
export const getMusicUrl = (id:any)=>{
    let res = axios.get(`/song/url?id=${id}`);
    return res;
}
//获取歌曲封面
export const getImage = (aid:any)=>{
    let res = axios.get(`/album?id=${aid}`);
    return res;
}
//获取歌曲mv
export const getMv = (mvid:any)=>{
    let res = axios.get('/mv/url?id='+mvid);
    return res
}
//获取评论
export const getComment = (id:any)=>{
    let res = axios.get(`comment/hot?id=${id}&type=0`);
    return res
}